﻿#region Header

// <file>
//     <copyright see="prj:///doc/copyright.txt"/>
//     <license see="prj:///doc/license.txt"/>
//     <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
//     <version>$Revision: 1965 $</version>
// </file>

#endregion Header

namespace ICSharpCode.TextEditor.Document
{
    using System;
    using System.Xml;

    /// <summary>
    /// Used for mark next token
    /// </summary>
    public class NextMarker
    {
        #region Fields

        HighlightColor color;
        bool markMarker = false;
        string what;

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Creates a new instance of <see cref="NextMarker"/>
        /// </summary>
        public NextMarker(XmlElement mark)
        {
            color = new HighlightColor(mark);
            what  = mark.InnerText;
            if (mark.Attributes["markmarker"] != null) {
                markMarker = Boolean.Parse(mark.Attributes["markmarker"].InnerText);
            }
        }

        #endregion Constructors

        #region Properties

        /// <value>
        /// Color for marking next token
        /// </value>
        public HighlightColor Color
        {
            get {
                return color;
            }
        }

        /// <value>
        /// If true the indication text will be marked with the same color
        /// too
        /// </value>
        public bool MarkMarker
        {
            get {
                return markMarker;
            }
        }

        /// <value>
        /// String value to indicate to mark next token
        /// </value>
        public string What
        {
            get {
                return what;
            }
        }

        #endregion Properties
    }
}